<?php

class Searchmodel extends Model
{	
		//Constructor
		function Searchmodel()
		{
				parent::Model();
				
		}
		
		function searchPeople($keyword)
		{
			$this->db->select('*');
			$this->db->like('username', $keyword);
			$this->db->or_like('email', $keyword);
			$query = $this->db->get('users');
			
			if($query->num_rows() > 0)
			{
				foreach($query->result_array() as $row)
				{
					$result[] = $row;
				}
				return $result;
			}
			else
			{
				return FALSE;
			}
		}
}
